home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / a_man / cat1 / chrtbl.z / chrtbl
Encoding:
Text File  |  1998-10-20  |  20.5 KB  |  331 lines

  1.  
  2.  
  3.  
  4. cccchhhhrrrrttttbbbbllll((((1111MMMM))))                                                          cccchhhhrrrrttttbbbbllll((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _cccc_hhhh_rrrr_tttt_bbbb_llll - generate character classification and conversion tables
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _cccc_hhhh_rrrr_tttt_bbbb_llll [_f_i_l_e]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      The _cccc_hhhh_rrrr_tttt_bbbb_llll command creates two tables containing information on character
  16.      classification, upper/lowercase conversion, character-set width, and
  17.      numeric formatting.  One table is an array of (2*257*4) + 7 bytes that is
  18.      encoded so a table lookup can be used to determine the character
  19.      classification of a character, convert a character [see _cccc_tttt_yyyy_pppp_eeee(3C)], and
  20.      find the byte and screen width of a character in one of the supplementary
  21.      code sets.  The other table contains information about the format of
  22.      non-monetary numeric quantities: the first byte specifies the decimal
  23.      delimiter; the second byte specifies the thousands delimiter; and the
  24.      remaining bytes comprise a null-terminated string indicating the grouping
  25.      (each element of the string is taken as an integer that indicates the
  26.      number of digits that comprise the current group in a formatted non-
  27.      monetary numeric quantity).
  28.  
  29.      _cccc_hhhh_rrrr_tttt_bbbb_llll reads the user-defined character classification and conversion
  30.      information from _f_i_l_e and creates three output files in the current
  31.      directory.  To construct _f_i_l_e, use the file supplied in
  32.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_CCCC_////_cccc_hhhh_rrrr_tttt_bbbb_llll______CCCC as a starting point.  You may add entries, but
  33.      do not change the original values supplied with the system.  For example,
  34.      for other locales you may wish to add eight-bit entries to the ASCII
  35.      definitions provided in this file.
  36.  
  37.      One output file, _cccc_tttt_yyyy_pppp_eeee_...._cccc (a C language source file), contains a
  38.      (2*257*4)+7-byte array generated from processing the information from
  39.      _f_i_l_e.  You should review the content of _cccc_tttt_yyyy_pppp_eeee_...._cccc to verify that the array
  40.      is set up as you had planned.  (In addition, an application program could
  41.      use _cccc_tttt_yyyy_pppp_eeee_...._cccc.)  The first 257*4 bytes of the array in _cccc_tttt_yyyy_pppp_eeee_...._cccc are used for
  42.      storing 32-bit character classification for 257 characters.  The
  43.      characters used for initializing these bytes of the array represent
  44.      character classifications that are defined in _cccc_tttt_yyyy_pppp_eeee_...._hhhh; for example, ______LLLL
  45.      means a character is lowercase and ______SSSS_||||______BBBB means the character is both a
  46.      spacing character and a blank.  The second 257*4 bytes of the array are
  47.      used for character conversion with 514 elements consisting of 16-bit
  48.      each.  These bytes of the array are initialized so that characters for
  49.      which you do not provide conversion information will be converted to
  50.      themselves.  When you do provide conversion information, the first value
  51.      of the pair is stored where the second one would be stored normally, and
  52.      vice versa; for example, if you provide _<<<<_0000_xxxx_4444_1111 _0000_xxxx_6666_1111_>>>>, then _0000_xxxx_6666_1111 is stored
  53.      where _0000_xxxx_4444_1111 would be stored normally, and _0000_xxxx_6666_1111 is stored where _0000_xxxx_4444_1111 would
  54.      be stored normally.  The last 7 bytes are used for character width
  55.      information for up to three supplementary code sets.
  56.  
  57.      The second output file (a data file) contains the same information, but
  58.      is structured for efficient use by the character classification and
  59.      conversion routines [see _cccc_tttt_yyyy_pppp_eeee(3C)].  The name of this output file is the
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. cccchhhhrrrrttttbbbbllll((((1111MMMM))))                                                          cccchhhhrrrrttttbbbbllll((((1111MMMM))))
  71.  
  72.  
  73.  
  74.      value you assign to the keyword _LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE read in from _f_i_l_e.  Before this
  75.      file can be used by the character classification and conversion routines,
  76.      it must be installed in the _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee/_l_o_c_a_l_e directory with the
  77.      name _LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE by someone who is super-user or a member of group _bbbb_iiii_nnnn.
  78.      This file must be readable by user, group, and other; no other
  79.      permissions should be set.  To use the character classification
  80.      and conversion tables in this file, set the _LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE environment variable
  81.      appropriately [see _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5) or _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee(3C)].
  82.  
  83.      The third output file (a data file) is created only if numeric formatting
  84.      information is specified in the input file.  The name of this output file
  85.      is the value you assign to the keyword _LLLL_CCCC______NNNN_UUUU_MMMM_EEEE_RRRR_IIII_CCCC read in from _f_i_l_e.
  86.      Before this file can be used, it must be installed in the
  87.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_l_o_c_a_l_e directory with the name _LLLL_CCCC______NNNN_UUUU_MMMM_EEEE_RRRR_IIII_CCCC by someone who
  88.      is super-user or a member of group _bbbb_iiii_nnnn.  This file must be readable by
  89.      user, group, and other; no other permissions should be set.  To use the
  90.      numeric formatting information in this file, set the _LLLL_CCCC______NNNN_UUUU_MMMM_EEEE_RRRR_IIII_CCCC
  91.      environment variable appropriately [see _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5) or _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee(3C)].
  92.  
  93.      The name of the locale where you install the files _LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE and
  94.      _LLLL_CCCC______NNNN_UUUU_MMMM_EEEE_RRRR_IIII_CCCC should correspond to the conventions defined in _f_i_l_e.  For
  95.      example, if French conventions were defined, and the name for the French
  96.      locale on your system is _ffff_rrrr_eeee_nnnn_cccc_hhhh, then you should install the files in
  97.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_ffff_rrrr_eeee_nnnn_cccc_hhhh.
  98.  
  99.      If no input file is given, or if the argument "-" is encountered, _cccc_hhhh_rrrr_tttt_bbbb_llll
  100.      reads from standard input.
  101.  
  102.      The syntax of _f_i_l_e allows the user to define the names of the data files
  103.      created by _cccc_hhhh_rrrr_tttt_bbbb_llll, the assignment of characters to character
  104.      classifications, the relationship between upper and lowercase letters,
  105.      byte and screen widths for up to three supplementary code sets, and three
  106.      items of numeric formatting information: the decimal delimiter, the
  107.      thousands delimiter, and the grouping.  The keywords recognized by _cccc_hhhh_rrrr_tttt_bbbb_llll
  108.      are:
  109.  
  110.      _LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE         name of the data file created by _cccc_hhhh_rrrr_tttt_bbbb_llll to contain
  111.                       character classification, conversion, and width
  112.                       information
  113.  
  114.      _iiii_ssss_uuuu_pppp_pppp_eeee_rrrr          character codes to be classified as uppercase letters
  115.  
  116.      _iiii_ssss_llll_oooo_wwww_eeee_rrrr          character codes to be classified as lowercase letters
  117.  
  118.      _iiii_ssss_aaaa_llll_pppp_hhhh_aaaa          character codes to be classified as letters
  119.  
  120.      _iiii_ssss_dddd_iiii_gggg_iiii_tttt          character codes to be classified as numeric digits
  121.  
  122.      _iiii_ssss_ssss_pppp_aaaa_cccc_eeee          character codes to be classified as white-space
  123.                       (delimiter) characters
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. cccchhhhrrrrttttbbbbllll((((1111MMMM))))                                                          cccchhhhrrrrttttbbbbllll((((1111MMMM))))
  137.  
  138.  
  139.  
  140.      _iiii_ssss_pppp_uuuu_nnnn_cccc_tttt          character codes to be classified as punctuation
  141.                       characters
  142.  
  143.      _iiii_ssss_cccc_nnnn_tttt_rrrr_llll          character codes to be classified as control characters
  144.  
  145.      _iiii_ssss_bbbb_llll_aaaa_nnnn_kkkk          character codes to be classified as blank characters
  146.  
  147.      _iiii_ssss_pppp_rrrr_iiii_nnnn_tttt          character codes to be classified as printing characters,
  148.                       including the space character
  149.  
  150.      _iiii_ssss_gggg_rrrr_aaaa_pppp_hhhh          character codes to be classified as printable
  151.                       characters, not including the space character
  152.  
  153.      _iiii_ssss_xxxx_dddd_iiii_gggg_iiii_tttt         character codes to be classified as hexadecimal digits
  154.  
  155.      _uuuu_llll               relationship between upper- and lowercase characters
  156.  
  157.      _cccc_ssss_wwww_iiii_dddd_tttt_hhhh          byte and screen width information (by default, each is
  158.                       one character wide)
  159.  
  160.      _LLLL_CCCC______NNNN_UUUU_MMMM_EEEE_RRRR_IIII_CCCC       name of the data file created by _cccc_hhhh_rrrr_tttt_bbbb_llll to contain
  161.                       numeric formatting information
  162.  
  163.      _dddd_eeee_cccc_iiii_mmmm_aaaa_llll______pppp_oooo_iiii_nnnn_tttt    decimal delimiter
  164.  
  165.      _tttt_hhhh_oooo_uuuu_ssss_aaaa_nnnn_dddd_ssss______ssss_eeee_pppp    thousands delimiter
  166.  
  167.      _gggg_rrrr_oooo_uuuu_pppp_iiii_nnnn_gggg         string in which each element is taken as an integer that
  168.                       indicates the number of digits that comprise the current
  169.                       group in a formatted non-monetary numeric quantity.
  170.  
  171.      Any lines with the number sign (_####) in the first column are treated as
  172.      comments and are ignored.  Blank lines are also ignored.
  173.  
  174.      Characters for _iiii_ssss_uuuu_pppp_pppp_eeee_rrrr, _iiii_ssss_llll_oooo_wwww_eeee_rrrr, _iiii_ssss_aaaa_llll_pppp_hhhh_aaaa, _iiii_ssss_dddd_iiii_gggg_iiii_tttt, _iiii_ssss_ssss_pppp_aaaa_cccc_eeee, _iiii_ssss_pppp_uuuu_nnnn_cccc_tttt,
  175.      _iiii_ssss_cccc_nnnn_tttt_rrrr_llll, _iiii_ssss_bbbb_llll_aaaa_nnnn_kkkk, _iiii_ssss_pppp_rrrr_iiii_nnnn_tttt, _iiii_ssss_gggg_rrrr_aaaa_pppp_hhhh, _iiii_ssss_xxxx_dddd_iiii_gggg_iiii_tttt, and _uuuu_llll can be represented
  176.      as a hexadecimal or octal constant (for example, the letter _aaaa can be
  177.      represented as _0000_xxxx_6666_1111 in hexadecimal or _0000_1111_4444_1111 in octal).  Hexadecimal and
  178.      octal constants may be separated by one or more space and/or tab
  179.      characters.
  180.  
  181.      The dash character (_----) may be used to indicate a range of consecutive
  182.      numbers.  Zero or more space characters may be used for separating the
  183.      dash character from the numbers.
  184.  
  185.      The backslash character (_\\\\) is used for line continuation.  Only a
  186.      carriage return is permitted after the backslash character.
  187.  
  188.      The relationship between upper- and lowercase letters (_uuuu_llll) is expressed
  189.      as ordered pairs of octal or hexadecimal constants:  <_u_p_p_e_r_c_a_s_e__c_h_a_r_a_c_t_e_r
  190.      _l_o_w_e_r_c_a_s_e__c_h_a_r_a_c_t_e_r>.  These two constants may be separated by one or
  191.      more space characters.  Zero or more space characters may be used for
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. cccchhhhrrrrttttbbbbllll((((1111MMMM))))                                                          cccchhhhrrrrttttbbbbllll((((1111MMMM))))
  203.  
  204.  
  205.  
  206.      separating the angle brackets (< >) from the numbers.
  207.  
  208.      The following is the format of an input specification for _cccc_ssss_wwww_iiii_dddd_tttt_hhhh:
  209.  
  210.           _cccc_ssss_wwww_iiii_dddd_tttt_hhhh _nnnn_1111_[[[[_[[[[_::::_ssss_1111_]]]]_[[[[_,,,,_nnnn_2222_[[[[_::::_ssss_2222_]]]]_[[[[_,,,,_nnnn_3333_[[[[_::::_ssss_3333_]]]]_]]]]_]]]]_]]]]
  211.  
  212.      where,
  213.           _nnnn_1111   byte width for supplementary code set 1, required
  214.           _ssss_1111   screen width for supplementary code set 1
  215.           _nnnn_2222   byte width for supplementary code set 2
  216.           _ssss_2222   screen width for supplementary code set 2
  217.           _nnnn_3333   byte width for supplementary code set 3
  218.           _ssss_3333   screen width for supplementary code set 3
  219.  
  220.      _dddd_eeee_cccc_iiii_mmmm_aaaa_llll______pppp_oooo_iiii_nnnn_tttt and _tttt_hhhh_oooo_uuuu_ssss_aaaa_nnnn_dddd_ssss______ssss_eeee_pppp are specified by a single character that
  221.      gives the delimiter.  _gggg_rrrr_oooo_uuuu_pppp_iiii_nnnn_gggg is specified by a quoted string in which
  222.      each member may be in octal or hex representation.  For example, _\\\\_3333 or
  223.      _\\\\_xxxx_3333 could be used to set the value of a member of the string to 3.
  224.  
  225. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  226.      The following is an example of an input file used to create the USA-
  227.      ENGLISH code set definition table in a file named _uuuu_ssss_aaaa and the non-
  228.      monetary numeric formatting information in a file name _nnnn_uuuu_mmmm_----_uuuu_ssss_aaaa.
  229.           LC_CTYPE  usa
  230.           isupper   0x41 - 0x5a
  231.           islower   0x61 - 0x7a
  232.           isdigit   0x30 - 0x39
  233.           isspace   0x20 0x9 - 0xd
  234.           ispunct   0x21 - 0x2f    0x3a - 0x40    \
  235.                     0x5b - 0x60    0x7b - 0x7e
  236.           iscntrl   0x0 - 0x1f     0x7f
  237.           isblank   0x9 0x20
  238.           isprint   0x20
  239.           isxdigit  0x30 - 0x39    0x61 - 0x66    \
  240.                     0x41 - 0x46
  241.           ul       <0x41 0x61> <0x42 0x62> <0x43 0x63>  \
  242.                    <0x44 0x64> <0x45 0x65> <0x46 0x66>  \
  243.                    <0x47 0x67> <0x48 0x68> <0x49 0x69>  \
  244.                    <0x4a 0x6a> <0x4b 0x6b> <0x4c 0x6c>  \
  245.                    <0x4d 0x6d> <0x4e 0x6e> <0x4f 0x6f>  \
  246.                    <0x50 0x70> <0x51 0x71> <0x52 0x72>  \
  247.                    <0x53 0x73> <0x54 0x74> <0x55 0x75>  \
  248.                    <0x56 0x76> <0x57 0x77> <0x58 0x78>  \
  249.                    <0x59 0x79> <0x5a 0x7a>
  250.           cswidth        1:1,0:0,0:0
  251.           LC_NUMERIC     num_usa
  252.           decimal_point       .
  253.           thousands_sep       ,
  254.           grouping            "\3"
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. cccchhhhrrrrttttbbbbllll((((1111MMMM))))                                                          cccchhhhrrrrttttbbbbllll((((1111MMMM))))
  269.  
  270.  
  271.  
  272. FFFFIIIILLLLEEEESSSS
  273.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_l_o_c_a_l_e_////_LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE
  274.                      data files containing character classification,
  275.                      conversion, and character-set width information created
  276.                      by _cccc_hhhh_rrrr_tttt_bbbb_llll
  277.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_l_o_c_a_l_e_////_LLLL_CCCC______NNNN_UUUU_MMMM_EEEE_RRRR_IIII_CCCC
  278.                      data files containing numeric formatting information
  279.                      created by _cccc_hhhh_rrrr_tttt_bbbb_llll
  280.      _////_uuuu_ssss_rrrr_////_iiii_nnnn_cccc_llll_uuuu_dddd_eeee_////_cccc_tttt_yyyy_pppp_eeee_...._hhhh
  281.                      header file containing information used by character
  282.                      classification and conversion routines
  283.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_CCCC_////_cccc_hhhh_rrrr_tttt_bbbb_llll______CCCC
  284.                      input file used to construct _LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE and _LLLL_CCCC______NNNN_UUUU_MMMM_EEEE_RRRR_IIII_CCCC in
  285.                      the default locale.
  286.  
  287. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  288.      _cccc_tttt_yyyy_pppp_eeee(3C), _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee(3C), _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5)
  289.  
  290. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  291.      The error messages produced by _cccc_hhhh_rrrr_tttt_bbbb_llll are intended to be self-
  292.      explanatory.  They indicate errors in the command line or syntactic
  293.      errors encountered within the input file.
  294.  
  295. NNNNOOOOTTTTEEEESSSS
  296.      Changing the files in _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_CCCC will cause the system to behave
  297.      unpredictably.
  298.  
  299.      In IRIX 6.5, the content of the _LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE locale category was extended to
  300.      comply with the XPG/4 standard.  The older LC_CTYPE binary format will
  301.      not be recognized by the C library.  Therefore, all custom-built locales
  302.      created under an older version of IRIX must be regenerated with the later
  303.      versions of _llll_oooo_cccc_aaaa_llll_eeee_dddd_eeee_ffff(1) and associated _cccc_hhhh_rrrr_tttt_bbbb_llll(1M)/_wwww_cccc_hhhh_rrrr_tttt_bbbb_llll(1M).
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.